/**
 * Created by light on 15/6/3.
 */
//var mongoose = require("mongoose");

var express = require("express");
var app = express();

app.set('views','./views');// 设置模板相对路径(相对当前目录)
app.set('view engine','jade');// 设置模板引擎



app.get('/', function(req,res) {
    res.render('index',{
        title:'首页'
    });
});

app.get('/detail', function(req,res) {
    res.render('detail',{
        title:'详细页'
    });
});
app.get('/admin/list', function(req,res) {
    res.render('list',{
        title:'列表页'
    });
});
app.get('/admin', function(req,res) {
    res.render('admin',{
        title:'管理页'
    });
});

app.listen(3000, function () {
    console.log('app is listening at port 3000');
});